package com.chenshu.mybatis_demo.aspect;

import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.aspectj.lang.annotation.Pointcut;
import org.springframework.stereotype.Component;

/**
 * Created with IntelliJ IDEA
 * Description
 * User：chenshu
 * Date：2024-04-20
 * Time：16:55
 */
@Component
@Aspect
public class LoginAspect {
    @Pointcut("execution(* com.chenshu.mybatis_demo.controller.UserController.*(..))")
    public void myPointcut() {}

    @Before("myPointcut()")
    public void before() {
        System.out.println("进行登录验证");
    }
}
